﻿using System;
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace AnlianCommon.Common.Migrations
{
    public partial class mag6 : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.CreateTable(
                name: "SheepPurchases",
                columns: table => new
                {
                    PurchaseId = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    PurchaseName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    PurchaseTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    SheepType = table.Column<int>(type: "int", nullable: true),
                    PurchaseCategory = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    AccountingUnit = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    VendorId = table.Column<int>(type: "int", nullable: true),
                    Abstract = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    PrchaseNumber = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    RecordAuricle = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    CottageId = table.Column<int>(type: "int", nullable: true),
                    Field = table.Column<int>(type: "int", nullable: true),
                    Sex = table.Column<int>(type: "int", nullable: true),
                    GoodName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Package = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Measurement = table.Column<decimal>(type: "decimal(18,2)", nullable: true),
                    Storage = table.Column<int>(type: "int", nullable: true),
                    PurchasePrice = table.Column<decimal>(type: "decimal(18,2)", nullable: true),
                    PurchaseNumPrice = table.Column<decimal>(type: "decimal(18,2)", nullable: true),
                    PurchaseDiscount = table.Column<decimal>(type: "decimal(18,2)", nullable: true),
                    PurchaseAdjust = table.Column<decimal>(type: "decimal(18,2)", nullable: true),
                    PurchaseSettle = table.Column<decimal>(type: "decimal(18,2)", nullable: true),
                    PurchaseWeight = table.Column<decimal>(type: "decimal(18,2)", nullable: true),
                    CreatedOwnerId = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    CreatedTime = table.Column<DateTime>(type: "datetime2", nullable: true),
                    UpdatedOwnerId = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    UpdatedTime = table.Column<DateTime>(type: "datetime2", nullable: true),
                    DeletedOwnerId = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    DeletedTime = table.Column<DateTime>(type: "datetime2", nullable: true),
                    IsDeleted = table.Column<bool>(type: "bit", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_SheepPurchases", x => x.PurchaseId);
                });
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropTable(
                name: "SheepPurchases");
        }
    }
}
